package com.jhd.jiangxi.service;

import com.jhd.jiangxi.vo.JsonForResult;

import java.util.Map;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;

public interface VaccineService {
    //@FormUrlEncoded
    @Headers({"Content-Type: application/json;charset=UTF-8", "Accept: application/json"})//需要添加头
//    @POST("epiPurchaseReceipt/savePurchaseReceiptMstAndDtl")
    @POST("purchaseReceipt/savePurchaseReceiptMstAndDtl")
//    Call<JsonForResult> savePurchaseReceiptMstAndDtl(@Body RequestBody params);
    Call<ResponseBody> savePurchaseReceiptMstAndDtl(@Header("Authorization") String token, @Body RequestBody params);

    @GET("trace/getVaccineInfoByCode")
    Call<JsonForResult> getVaccineInfoByCode(@QueryMap Map<String, Object> params);

    @GET("purchaseReceipt/getDeliveryDtlByMstId")
    Call<JsonForResult> getDeliveryDtlByMstId(@Header("Authorization") String token, @QueryMap Map<String, Object> params);

    //https://epi.ws361.cn/test/auth/oauth/token
    //username: test   password:  giga@163.com
    @FormUrlEncoded
    @POST("auth/oauth/token")
//登录的接口
    Call<JsonForResult> getAuthInfo(@FieldMap Map<String, String> params);


//https://epi.ws361.cn/test/uc/sysDept/getDepartmentById
//    @GET("getDepartmentById")
//    Call<JsonForResult> getDepartmentById(@Header("Authorization") String token,@QueryMap Map<String,String> params);

    //trace
    @GET("sysDept/getDepartmentById")
    Call<JsonForResult> getDepartmentById(@Header("Authorization") String token, @QueryMap Map<String, String> params);

    @GET("basicData/getPriceBookMstList")
    Call<JsonForResult> getPriceBookMstList(@Header("Authorization") String token, @QueryMap Map<String, Object> params);

    @GET("basicData/getApprovalList")
    Call<JsonForResult> getApprovalList(@Header("Authorization") String token, @QueryMap Map<String, Object> params);

    @GET("uc/globalDictionary/getGlobalDictionaryByType")
    Call<JsonForResult> getGlobalDictionaryByType(@Header("Authorization") String token, @QueryMap Map<String, String> params);
    /*配送单位*/
    @GET("vaccineDistributionDempart/getVaccineDistributionDempartByDeptId")
    Call<JsonForResult> getVaccineDistributionDempartByDeptId(@Header("Authorization") String token, @QueryMap Map<String, String> params);

    @GET("basicData/getStorageInfoList")//获取储位列表,传deptId
    Call<JsonForResult> getStorageInfoList(@Header("Authorization") String token, @QueryMap Map<String, Object> params);
    @GET("storageInfo/getStorageInfoByDept")
    Call<JsonForResult> getStorageInfoByDept(@Header("Authorization") String token, @QueryMap Map<String, Object> params);

    @GET("supplyDepartment/getSupplyDepartmentList")
    Call<JsonForResult> getContactDeptList(@Header("Authorization") String token, @QueryMap Map<String, String> params);

    @GET("shipDepartment/getShipDepartmentList")
    Call<JsonForResult> getShipDepartmentList(@Header("Authorization") String token, @QueryMap Map<String, String> params);

    @Headers({"Content-Type: application/json", "Accept: application/json"})//需要添加头
    @POST("aliHealth/uploadOrderInfo")
    Call<ResponseBody> uploadOrderInfo(@Body RequestBody params);

    @GET("trace/getCodeRelation")
    Call<JsonForResult> getCodeRelation(@Header("Authorization") String token, @QueryMap Map<String, String> params);

    @GET("trace/trace/getVaccineInfoByCodeSingle")
    Call<JsonForResult> getVaccineInfoByCodeSingle(@Header("Authorization") String token, @QueryMap Map<String, String> params);
    @GET("trace/traceCodeBalance/getCodeBalanceByCode")
    Call<JsonForResult> getCodeBalanceByCode(@Header("Authorization") String token, @QueryMap Map<String, String> params);
    @GET("basicData/getInventoryList")//期初盘点获取导入库存,传deptId,category
    Call<JsonForResult> getInventoryList(@Header("Authorization") String token, @QueryMap Map<String, String> params);
    @GET("checkOrder/getInventoryListForCheck")//日常盘点获取导入库存,传deptId,category
    Call<JsonForResult> getInventoryListForCheck(@Header("Authorization") String token, @QueryMap Map<String, String> params);
    @GET("basicData/getVaccinesList")//日常盘点获取疫苗列表,传deptId,category
    Call<JsonForResult> getVaccinesList(@Header("Authorization") String token, @QueryMap Map<String, String> params);
    @GET("basicData/getGlobeManufacturesListFromManufacturesVaccineInfo")//日常盘点添加时,根据获取到的疫苗id,获取疫苗的生产厂家列表,传deptId和vaccineId
    Call<JsonForResult> getGlobeManufacturesListFromManufacturesVaccineInfo(@Header("Authorization") String token, @QueryMap Map<String, String> params);
    @GET("basicData/getVaccineLotsList")//日常盘点添加时,根据获取到的疫苗id和生产厂家Id,获取疫苗的批号列表,传deptId和vaccineId和manufacturerId和category
    Call<JsonForResult> getVaccineLotsList(@Header("Authorization") String token, @QueryMap Map<String, String> params);
    @GET("basicData/getUnitPriceByType")//日常盘点添加时,获取单价和服务价,传deptId,priceBookMstId,vaccineId,manufacturerId,orderType: CHECK_ORDER,propertyId
    Call<JsonForResult> getUnitPriceByType(@Header("Authorization") String token, @QueryMap Map<String, String> params);
    @GET("trace/piatsInfo/checkCodeParam")//日常盘点,判断code是否符合,传deptId,vaccineId,manufacturerId,propertyId,vaccineLotsId,lotNumber,code
    Call<JsonForResult> checkCodeParam(@Header("Authorization") String token, @QueryMap Map<String, String> params);
    @GET("equipmentInfo/validateSnIsLegal")//判断sn是否存在
    Call<JsonForResult> validateSnIsLegal(@QueryMap Map<String, String> params);
}
